package org.example;

public class TestMain {

    public static void main(String[] args) {
        // System.out.println(HttpStatus2.OK);
        // System.out.println(HttpStatus2.OK.getStatus());
        // System.out.println(HttpStatus2.OK.getCode());
        // System.out.println(HttpStatusEnum.OK.getCode());
        // System.out.println(HttpStatusEnum.OK.getCode());
        System.out.println(HttpStatusEnum.values().length);
        System.out.println(HttpStatusEnum.valueOf(HttpStatusEnum.OK.name()).getCode());
        System.out.println(HttpStatusEnum.OK.name());
        System.out.println(HttpStatusEnum.OK.ordinal());


        System.out.println("========values()方法=======");
        for (HttpStatusEnum httpStatusEnum : HttpStatusEnum.values()) {
            System.out.println(httpStatusEnum);
        }
        System.out.println("===========================");

        System.out.println("========valueOf方法========");
        HttpStatusEnum ok = HttpStatusEnum.valueOf("OK");
        System.out.println(ok);
        System.out.println("===========================");

        System.out.println("========toString方法========");
        System.out.println(ok.toString());
        System.out.println("===========================");

        System.out.println("========name方法========");
        System.out.println(ok.name());
        System.out.println("===========================");

        System.out.println("========ordinal方法========");
        System.out.println(ok.ordinal());
        System.out.println("===========================");

        System.out.println("========compareTo方法========");
        System.out.println(ok.compareTo(HttpStatusEnum.NOT_FOUND));
        System.out.println("===========================");


        HttpStatusEnum.OK.show();
        HttpStatusEnum2.OK.show();
    }
}
